<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>加油优惠价格计算</title>
</head>
<body>
    <script>
        var gas=prompt("请输入汽油编号：");
        var v=prompt("请输入你要加入多少升：");
        var price;
        
        if(gas==92){
            if(v<20){
                document.write("汽油6元一升;") 
                document.write(price=6*v);
            }else{
                document.write("汽油5.9元一升;") 
                document.write(price=5.9*v);
            }
        }if(gas==97){
            if(v<40){
                document.write("汽油7元一升;") 
                document.write(price=7*v);
            }else{
                document.write("汽油6.5元一升;") 
                document.write(price=6.5*v);
            }
        }
    </script>
</body>
</html>